<template>
  <div>
    <h1 class="title">{{ title }}</h1>
    <p v-html="poem"></p>
  </div>
</template>

<script setup lang="ts">
import { ref,onMounted } from 'vue';
import { getAgreement } from '@/api/help';
import { useRoute } from 'vue-router';
const route = useRoute();
const title = ref(route.query.title || '');
const poem = ref('')
const key = ref(route.query.key || '');
onMounted(async () => {
  // 在这里调用接口获取数据
  getAgreement(key.value).then((res: any) => {
    poem.value = res.data;
  });
  // 处理数据...
});
</script>

<style scoped lang="scss">
.title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}
</style>